using System;
using System.Xml.Serialization;	 //For serialization of an object to an XML Document file.

namespace Smg.Model
{
    /// <summary>
    /// Type of destinations an e-mail address relates to.
    /// </summary>
    public enum DbTypeDestination
    {
        Access = 0,
        MsSql = 1,
        MySql = 2
    }

    /// <summary>
    /// Custom class used to store an E-mail address.
    /// </summary>

    // Mark class as serializable.
    [Serializable]
    public class DbConnectionString
    {
        /// <summary>
        /// Default constructor for this class (required for serialization).
        /// </summary>
        public DbConnectionString()
        {
        }

        // Specify that this field should be serialized as an XML attribute 
        // instead of an element to demonstrate the formatting differences in an XML file. 
        [XmlAttribute]
        public string ConnectionString = null;

        // Specify that this field should be serialized as an XML attribute 
        // instead of an element to demonstrate the formatting differences in an XML file. 
        [XmlAttribute]
        public DbTypeDestination Destination = DbTypeDestination.Access;
    }
}
